<ion-app>
  <div class="ion-page" main>
      <ion-header>
          <ion-toolbar color="care" style="position: relative" mode="ios">
              <ion-buttons slot="start">
                  <ion-button (click)="toLogin()">{{ 'Login' | translate }}</ion-button>
              </ion-buttons>
              <ion-title>{{ ['Listone', 'ListHospital'][launcherType - 1] | translate }}</ion-title>
          </ion-toolbar>

          <div class="flex-hor-sb-cnt">
              <ion-chip style="width: 100%" outline="true" color="care" *ngFor="let item of segmentTabs" (click)="onSegmentClick(item.value)">
                  <div class="flex-hor-cnt-cnt" style="width: 100%">
                      <ion-label>{{item.label | translate}}</ion-label>
                      <ion-icon mode="md" name="arrow-dropdown"></ion-icon>
                  </div>
              </ion-chip>
          </div>
      </ion-header>

      <ion-content>
          <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
              <ion-refresher-content></ion-refresher-content>
          </ion-refresher>
          <app-doctor-item *ngFor="let doctor of doctorList" [imageUrl]="doctor.avatar_url"
              [nameLabel]="doctor.nickname" [orderType]="doctor.order_type" [addressLabel]="doctor.region_name"
              [iconLabel]="'pin'" [department]="doctor.department_name" [hasOrder]="doctor.has_order"
                           [startDate]="doctor.start_time" [endDate]="doctor.end_time"
                           (click)="onDoctorSelect(doctor)">
          </app-doctor-item>

          <div style="width: 100%; text-align:center" *ngIf="!!stopLoad">
              {{ 'NoMore' | translate }}
          </div>

          <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)">
              <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="Loading more data..."></ion-infinite-scroll-content>
          </ion-infinite-scroll>

          <ion-fab vertical="bottom" horizontal="end" slot="fixed">
              <ion-fab-button color="care" (click)="onFilterReset()">{{ 'RESET' | translate }}</ion-fab-button>
          </ion-fab>
      </ion-content>
  </div>
</ion-app>
